<template name="livechatCustomFields">
	{{#requiresPermission 'view-livechat-customfields'}}
		<div class="rc-table-content">
			{{#table fixed='true' onScroll=onTableScroll}}
				<thead>
					<tr>
						<th><div class="table-fake-th">{{_ "Field"}}</div></th>
						<th width="25%"><div class="table-fake-th">{{_ "Label"}}</div></th>
						<th width="25%"><div class="table-fake-th">{{_ "Scope"}}</div></th>
						<th width="25%"><div class="table-fake-th">{{_ "Visibility"}}</div></th>
						<th width="40px">&nbsp;</th>
					</tr>
				</thead>
				<tbody>
					{{#each customFields}}
						<tr class="custom-field-info row-link" data-id="{{_id}}">
							<td>
								<div class="rc-table-wrapper">
									<div class="rc-table-info">
										<span class="rc-table-title">{{_id}}</span>
									</div>
								</div>
							</td>
							<td>{{label}}</td>
							<td>{{scope}}</td>
							<td>{{visibility}}</td>
							<td><a href="#remove" class="remove-custom-field"><i class="icon-trash"></i></a></td>
						</tr>
					{{/each}}
				</tbody>
			{{/table}}
		</div>
		<div class="rc-button__group">
			<a href="{{pathFor 'livechat-customfield-new'}}" class="rc-button rc-button--primary">{{_ "New_Custom_Field"}}</a>
		</div>
	{{/requiresPermission}}
</template>
